<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-vue使用步骤</title>
</head>
<body>
    <div id="app">
        <div>
            <button v-show="current > 0" @click="current--">上一页</button>
        </div>
        <!--带有冒号说明从Vue实例中取值-->
        <img :src="url[current]" alt="图片">
        <div>
            <button v-show="current < url.length-1" @click="current++">下一页</button>
        </div>
    </div>

    <!--导入vue.js-->
    <script src="js/vue.js"></script>

    <script>
        /*创建vue实例对象*/
        let app = new Vue({
            /*数据挂载的节点*/
            el: '#app',
            data:{
                current: 0,
                url: ['images/11-00.gif',
                    'images/11-01.gif',
                    'images/11-02.gif',
                    'images/11-03.gif',
                    'images/11-04.png',
                    'images/11-05.png']

            }
        })

    </script>

</body>
</html>